mixin active(name)
    - var home_cls, chain_cls, contract_cls, analytics_cls, store_cls
    case name
        when "home"
            - home_cls = "uk-active"
        when "chain"
            - chain_cls = "uk-active"
        when "contract"
            - contract_cls = "uk-active"
        when "analytics"
            - analytics_cls = "uk-active"
        when "store"
            - store_cls = "uk-active"
    nav.uk-navbar.header.uk-navbar-attached.uk-grid
        .uk-float-left.uk-width-1-3
            img(src="/images/logo.svg", width="290")
        ul.uk-navbar-nav
            li(class=home_cls)
                a(href="/dashboard") Home
            li(class=chain_cls)
                a(href="/dashboard/chain") Chain
            li(class=contract_cls)
                a(href="/dashboard/contract") Smart Contract
            li(class=analytics_cls)
                a(href="/dashboard/analytics") Analytics
            li(class=store_cls)
                a(href="/dashboard/store") Store
        .uk-vertical-align.dashboard-sign-out(data-uk-dropdown="{remaintime:100,pos:'bottom-right'}")
            a.uk-vertical-align-middle.
                Welcome, #[span#welcomeInfo=username]
            .uk-dropdown.uk-dropdown-navbar.uk-dropdown-small
                ul.uk-nav.uk-nav-dropdown
                    li
                        a#profile
                            i.uk-icon-cog
                            = "\n"
                            | Your profile
                    li
                        a(href="/logout")
                            i.uk-icon-sign-out
                            = "\n"
                            | Sign out